Optimal. Leaf size=47 \[ -\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sin (c+d x)}{\sqrt {2} \sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)}}\right )}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {2782, 206} \[ -\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sin (c+d x)}{\sqrt {2} \sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)}}\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 2782
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)}} \, dx &=-\frac {2 \operatorname {Subst}\left (\int \frac {1}{2-x^2} \, dx,x,\frac {\sin (c+d x)}{\sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)}}\right )}{d}\\ &=-\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sin (c+d x)}{\sqrt {2} \sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)}}\right )}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.14, size = 110, normalized size = 2.34 \[ \frac {i e^{-i (c+d x)} \left (-1+e^{i (c+d x)}\right ) \sqrt {1+e^{2 i (c+d x)}} \tanh ^{-1}\left (\frac {1+e^{i (c+d x)}}{\sqrt {2} \sqrt {1+e^{2 i (c+d x)}}}\right )}{\sqrt {2} d \sqrt {-((\cos (c+d x)-1) \cos (c+d x))}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.82, size = 84, normalized size = 1.79 \[ \frac {\sqrt {2} \log \left (-\frac {2 \, {\left (\sqrt {2} \cos \left (d x + c\right ) + \sqrt {2}\right )} \sqrt {-\cos \left (d x + c\right ) + 1} \sqrt {\cos \left (d x + c\right )} - {\left (3 \, \cos \left (d x + c\right ) + 1\right )} \sin \left (d x + c\right )}{{\left (\cos \left (d x + c\right ) - 1\right )} \sin \left (d x + c\right )}\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.62, size = 79, normalized size = 1.68 \[ \frac {\sqrt {2} {\left (\log \left (\sqrt {2} + 1\right ) - \log \left (\sqrt {2} - 1\right ) - \log \left (\sqrt {-\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1} + 1\right ) + \log \left (-\sqrt {-\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1} + 1\right )\right )}}{2 \, d \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.13, size = 84, normalized size = 1.79 \[ \frac {4 \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \left (-1+\cos \left (d x +c \right )\right ) \sin \left (d x +c \right ) \arctanh \left (\frac {\sqrt {2}}{2 \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right )}{d \sqrt {\cos \left (d x +c \right )}\, \left (2-2 \cos \left (d x +c \right )\right )^{\frac {3}{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.99, size = 248, normalized size = 5.28 \[ \frac {\sqrt {2} \log \left (\frac {4 \, {\left ({\left | i \, e^{\left (i \, d x + i \, c\right )} - i \right |}^{2} + 2 \, \sqrt {\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1} {\left (\cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )^{2} + \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )^{2}\right )} - 2 \, {\left (\sqrt {2} {\left | i \, e^{\left (i \, d x + i \, c\right )} - i \right |} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) - 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )\right )} {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} + 4\right )}}{{\left | i \, e^{\left (i \, d x + i \, c\right )} - i \right |}^{2}}\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {1}{\sqrt {\cos \left (c+d\,x\right )}\,\sqrt {1-\cos \left (c+d\,x\right )}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\sqrt {1 - \cos {\left (c + d x \right )}} \sqrt {\cos {\left (c + d x \right )}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________